$OpenBSD: patch-ext_openssl_openssl_c,v 1.2 2014/08/23 10:45:41 sthen Exp $
--- ext/openssl/openssl.c.orig.port	Wed Aug 20 21:15:22 2014
+++ ext/openssl/openssl.c	Fri Aug 22 14:31:27 2014
@@ -915,11 +915,13 @@ static int php_openssl_load_rand_file(const char * fil
 
 	if (file == NULL) {
 		file = RAND_file_name(buffer, sizeof(buffer));
+#ifdef HAVE_SSL_RAND_EGD
 	} else if (RAND_egd(file) > 0) {
 		/* if the given filename is an EGD socket, don't
 		 * write anything back to it */
 		*egdsocket = 1;
 		return SUCCESS;
+#endif
 	}
 	if (file == NULL || !RAND_load_file(file, -1)) {
 		if (RAND_status() == 0) {
